// @APIVersion 1.0.0
// @Title beego Test API
// @Description beego has a very cool tools to autogenerate documents for your API
// @Contact astaxie@gmail.com
// @TermsOfServiceUrl http://beego.me/
// @License Apache 2.0
// @LicenseUrl http://www.apache.org/licenses/LICENSE-2.0.html
package routers

import (
	"github.com/astaxie/beego"

	"cvevulner/controllers"
)

func initController() {
	ns := beego.NewNamespace("/v1",
		beego.NSNamespace("/object",
			beego.NSInclude(
				&controllers.ObjectController{},
			),
		),
		beego.NSNamespace("/packages",
			beego.NSInclude(
				&controllers.PackagesController{},
			),
		),
		beego.NSNamespace("/packages/packageinfo",
			beego.NSInclude(
				&controllers.PackagesInfoController{},
			),
		),
		beego.NSNamespace("/user",
			beego.NSInclude(
				&controllers.UserController{},
			),
		),
		beego.NSNamespace("/user/login",
			beego.NSInclude(
				&controllers.UserLoginController{},
			),
		),
		beego.NSNamespace("/cve/upload",
			beego.NSInclude(
				&controllers.UserUploadController{},
			),
		),
		beego.NSNamespace("/issue/oauth/callback",
			beego.NSInclude(
				&controllers.IssueOathCallbackController{},
			),
		),
		beego.NSNamespace("/issue/hook/event",
			beego.NSInclude(&controllers.HookEventControllers{}),
		),
		beego.NSNamespace("/download/excel",
			beego.NSInclude(
				&controllers.FileController{},
			),
		),
		beego.NSNamespace("/cve/detail",
			beego.NSInclude(
				&controllers.CveDetailController{},
			),
		),
		beego.NSNamespace("/cve/error/feedback",
			beego.NSInclude(
				&controllers.CveErrorFeedBackController{},
			),
		),
		beego.NSNamespace("/cve/issue/whitelist",
			beego.NSInclude(
				&controllers.CveIssueWhiteListController{},
			),
		),
		//Get the issue corresponding to the branch information affected by cve
		beego.NSNamespace("/cve/issue",
			beego.NSInclude(
				&controllers.CveIssueInfoController{},
			),
		),
		//Obtain all cve data and provide operation kanban for use1
		beego.NSNamespace("/cve/all/issue",
			beego.NSInclude(
				&controllers.CveAllIssueController{},
			),
		),
		//Obtain all cve data and provide operation kanban for use2
		beego.NSNamespace("/kanban/cve/all/issue",
			beego.NSInclude(
				&controllers.KanbanCveAllIssueController{},
			),
		),
		// Update new affected branch to issue
		beego.NSNamespace("/update/affected/branch",
			beego.NSInclude(
				&controllers.UpdateAffectedBranchController{},
			),
		),
		// openGauss generates a summary of Sa data, and manually triggers the data at regular intervals
		beego.NSNamespace("/gauss/triggerCveData",
			beego.NSInclude(
				&controllers.GenSaController{},
			),
		),
		// Get the information of the SA that has been generated
		beego.NSNamespace("/gauss/sa",
			beego.NSInclude(
				&controllers.GaussSaController{},
			),
		),
		// Get the details of gauss' sa
		beego.NSNamespace("/gauss/sa/detail",
			beego.NSInclude(
				&controllers.GaussSaDetailController{},
			),
		),
		// Get the cve information of gauss
		beego.NSNamespace("/gauss/cve",
			beego.NSInclude(
				&controllers.GaussCveController{},
			),
		),
		// Get the cve details of gauss
		beego.NSNamespace("/gauss/cve/detail",
			beego.NSInclude(
				&controllers.GaussCveDetailController{},
			),
		),
	)
	beego.AddNamespace(ns)
}
